import http from './http'

export const getPage = async(index) =>{
    return await http.fetchGet(`/api/amber/page?pageIndex=${index}`);
}

export const get = async(id) =>{
    return await http.fetchGet(`/api/amber/get?id=${id}`);
}

export const del = async(id) =>{
    return await http.fetchPost(`/api/amber/del?id=${id}`, {})
}

export const save = async(amber) =>{
    return await http.fetchPost(`/api/amber/save`, amber)
}

export default {
    getPage,
    get,
    del,
    save
}